package com.cskaoyan.javase.string._4exercise;

/**
 * 读程序题
 * @since 11:29
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo2 {
    public static void main(String[] args) {
        String s1 = "hello";
        String s2 = "world";
        String s3 = "helloworld";
        // false
        System.out.println(s3 == (s1 + s2));
        // true
        System.out.println(s3.equals(s1 + s2));
        // true
        System.out.println(s3 == ("hello" + "world"));
        // true
        System.out.println(s3.equals("hello" + "world"));
    }
}
